﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using RXY_Mall.Core;
using RXY_Mall.Domain;

namespace RXY_Mall.Api.Models
{

    #region 登录注册
    /// <summary>
    /// 登录输入信息
    /// </summary>
    public class LoginInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空！")]
        public string name { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "密码不能为空！")]
        public string password { get; set; }
        /// <summary>
        /// 设备号
        /// </summary>
        public string device_no { get; set; }
    }

    /// <summary>
    /// 登录输入信息
    /// </summary>
    public class QuickLoginInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空！")]
        public string name { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "验证码不能为空！")]
        public string code { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string order_no { get; set; }
        /// <summary>
        /// 推荐人手机号
        /// </summary>
        public string referrer_name { get; set; }
        /// <summary>
        /// 设备号
        /// </summary>
        public string device_no { get; set; }
    }

    /// <summary>
    /// 登录输入信息
    /// </summary>
    public class ServiceLoginInput
    {
        /// <summary>
        /// 微信Code
        /// </summary>
        public string code { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string order_no { get; set; }
    }

    /// <summary>
    /// 注册输入信息
    /// </summary>
    public class BindingLoginInput
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空！")]
        public string name { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "验证码不能为空！")]
        public string code { get; set; }
        /// <summary>
        /// 第三登录
        /// </summary>
        public ThirdLoginInput third_login { get; set; }
        /// <summary>
        /// 设备号
        /// </summary>
        public string device_no { get; set; }
        /// <summary>
        /// 推荐人手机号
        /// </summary>
        public string referrer_name { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string order_no { get; set; }
    }

    /// <summary>
    /// 第三方登录
    /// </summary>
    public class ThirdLoginInput
    {
        /// <summary>
        /// 第三方登录 1-QQ 2-微信 3-公众号
        /// </summary>
        public BindingType type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string uid { get; set; }
        /// <summary>
        /// open_id
        /// </summary>
        public string open_id { get; set; }
        public string union_id { get; set; }
        public string access_token { get; set; }
        public string oauth_consumer_key { get; set; }
        public string usid { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public string gender { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string icon_url { get; set; }
        /// <summary>
        /// 设备号
        /// </summary>
        public string device_no { get; set; }

    }

    /// <summary>
    /// 登录输出信息
    /// </summary>
    public class LoginOutput : BaseInput
    {
        /// <summary>
        /// token
        /// </summary>
        public string token { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 服务号-access_token
        /// </summary>
        public string access_token { get; set; }
        /// <summary>
        /// 服务号-open_id
        /// </summary>
        public string open_id { get; set; }
    }

    /// <summary>
    /// 注册用户信息
    /// </summary>
    public class RegisterInput
    {
        /// <summary>
        /// 店铺名称
        /// </summary>
        [Required(ErrorMessage = "店铺名称不能为空！")]
        public string store_name { get; set; }
        /// <summary>
        /// 店铺类型
        /// </summary>
        public StoreType store_type { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [Required(ErrorMessage = "姓名不能为空！")]
        public string contacts_name { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空！")]
        [RegularExpression(@"^((1[345678][0-9]{1}))\d{8}", ErrorMessage = "手机号格式不正确！")]
        public string mobile { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        //[Required(ErrorMessage = "密码不能为空！")]
        //[RegularExpression(@"^[0-9a-zA-Z`~!@#$%\^&*()_+-={}|\[\]:"";'<>?,.]{6,12}$", ErrorMessage = "密码格式不正确！")]
        //internal string password { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "验证码不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "验证码格式不正确！")]
        public string code { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public string province_code { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string city_code { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string country_code { get; set; }
        /// <summary>
        /// 省市区逗号分隔
        /// </summary>
        [Required(ErrorMessage = "选择区域不能为空！")]
        public string area { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        [Required(ErrorMessage = "详细地址不能为空！")]
        public string address { get; set; }
        /// <summary>
        /// 推荐人-用户名
        /// </summary>
        public string referrer_name { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        internal string order_no { get; set; }
    }

    /// <summary>
    /// 绑定设备号
    /// </summary>
    public class BindingDeviceInput : BaseInput
    {
        /// <summary>
        /// 设备号
        /// </summary>
        public string device_no { get; set; }
    }

    public class WechatOauth
    {
        public string access_token { get; set; }
        public long expires_in { get; set; }
        public string refresh_token { get; set; }
        public string openid { get; set; }
        public string scope { get; set; }
    }

    #endregion

    #region 忘记密码
    /// <summary>
    /// 忘记密码
    /// </summary>
    public class UpdateLoginPasswordBySMSInput
    {
        /// <summary>
        /// 短信验证码
        /// </summary>
        [Required(ErrorMessage = "短信验证不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "验证码格式不正确！")]
        public string code { get; set; }
        /// <summary>
        /// 新登录密码
        /// </summary>
        [Required(ErrorMessage = "新登录密码不能为空！")]
        [RegularExpression(@"^[0-9a-zA-Z`~!@#$%\^&*()_+-={}|\[\]:"";'<>?,.]{6,12}$", ErrorMessage = "密码格式不正确！")]
        public string new_password { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空！")]
        public string name { get; set; }
    }
    #endregion

    #region 个人信息
    /// <summary>
    /// 获得个人信息输入信息
    /// </summary>
    public class GetUserInfoOutput
    {
        internal byte status;
        internal ICollection<gw_user_certification> gw_user_certification;
        internal gw_finance_property gw_finance_property;
        internal DateTime? _birthday;
        internal List<user_third> thirds;
        internal gw_user_store user_store;
        internal gw_company gw_company;

        /// <summary>
        /// 会员开始时间
        /// </summary>
        internal System.DateTime? start_time { get; set; }
        /// <summary>
        /// 会员结束时间
        /// </summary>
        internal System.DateTime? end_time { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        public int user_id { get; set; }
        /// <summary>
        /// 用户名（手机号）
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 用户昵称
        /// </summary>
        public string nick_name { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string real_name { get; internal set; }
        /// <summary>
        /// 头像
        /// </summary>
        public string logo { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public string sex { get; set; }
        /// <summary>
        /// 地区
        /// </summary>
        public string address { get; set; }
        /// <summary>
        /// 出生日期
        /// </summary>
        public string birthday { get; internal set; }
        /// <summary>
        /// 签名
        /// </summary>
        public string signature { get; set; }
        /// <summary>
        /// 用户级别 0-普通会员 1-黑卡会员 2-掌门人
        /// </summary>
        public UserGrade grade { get; set; }
        /// <summary>
        /// 余额
        /// </summary>
        public string balance { get; set; }
        /// <summary>
        /// 蚨豆
        /// </summary>
        public string bean { get; set; }
        /// <summary>
        /// 弟子
        /// </summary>
        public int child { get; set; }
        /// <summary>
        /// 优惠券
        /// </summary>
        public string coupon { get; set; }
        /// <summary>
        /// 经验值
        /// </summary>
        public string exp { get; set; }
        /// <summary>
        /// 是否实名认证
        /// </summary>
        public bool is_certification { get; set; }

        /// <summary>
        /// 会员开始时间
        /// </summary>
        public long member_start_time { get; set; }
        /// <summary>
        /// 会员结束时间
        /// </summary>
        public long member_end_time { get; set; }
        /// <summary>
        /// 优惠券数量
        /// </summary>
        public int coupon_count { get; internal set; }
        /// <summary>
        /// 弟子数量
        /// </summary>
        public int child_count { get; set; }
        /// <summary>
        /// 是否绑定微信
        /// </summary>
        public bool is_wechat { get; set; }
        /// <summary>
        /// 微信号
        /// </summary>
        public string wechat { get; internal set; }
        /// <summary>
        /// 是否QQ
        /// </summary>
        public bool is_qq { get; internal set; }
        /// <summary>
        /// QQ号
        /// </summary>
        public string qq { get; internal set; }
        /// <summary>
        /// 店铺
        /// </summary>
        public StoreOutput store { get; set; }
        /// <summary>
        /// 客服电话
        /// </summary>
        public string contacts_phone { get; set; }
    }

    public class StoreOutput
    {
        /// <summary>
        /// 店铺名称
        /// </summary>
        public string store_name { get; set; }
        /// <summary>
        /// 店铺类型
        /// </summary>
        public StoreType store_type { get; set; }
        /// <summary>
        /// 联系人
        /// </summary>
        public string contacts_name { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        public string mobile { get; set; }
        /// <summary>
        /// 固定电话
        /// </summary>
        public string telphone { get; set; }
        /// <summary>
        /// 地区
        /// </summary>
        public string area { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        public string address { get; set; }
    }

    internal class user_third
    {
        public string name { get; set; }
        public byte type { get; set; }
    }

    /// <summary>
    /// 修改用户头像
    /// </summary>
    public class UpdateUserLogoInput : BaseInput
    {
        /// <summary>
        /// 用户头像
        /// </summary>
        [Required(ErrorMessage = "用户头像不能为空")]
        public string logo { get; set; }
    }

    /// <summary>
    /// 修改用户昵称
    /// </summary>
    public class UpdateNickNameInput : BaseInput
    {
        /// <summary>
        /// 用户昵称
        /// </summary>
        [Required(ErrorMessage = "用户昵称不能为空")]
        public string nick_name { get; set; }
    }

    /// <summary>
    /// 修改签名
    /// </summary>
    public class UpdateSignatureInput : BaseInput
    {
        /// <summary>
        /// 签名
        /// </summary>
        [Required(ErrorMessage = "签名不能为空")]
        public string signature { get; set; }
    }

    /// <summary>
    /// 修改常住地址
    /// </summary>
    public class UpdateUserAddressInput : BaseInput
    {
        /// <summary>
        /// 常住地址
        /// </summary>
        [Required(ErrorMessage = "常住地址不能为空")]
        public string address { get; set; }
    }

    /// <summary>
    /// 修改OpenId
    /// </summary>
    public class UpdateOpenIdInput : BaseInput
    {
        /// <summary>
        /// open_id
        /// </summary>
        [Required(ErrorMessage = "open_id不能为空")]
        public string open_id { get; set; }
    }

    /// <summary>
    /// 修改出生日期
    /// </summary>
    public class UpdateBirthdayInput : BaseInput
    {
        /// <summary>
        /// 出生日期
        /// </summary>
        [Required(ErrorMessage = "出生日期不能为空")]
        public DateTime birthday { get; set; }
    }



    /// <summary>
    /// 修改用户头像
    /// </summary>
    public class UpdateSexInput : BaseInput
    {
        /// <summary>
        /// 用户性别(M:男，F:女)
        /// </summary>
        [Required(ErrorMessage = "性别不能为空！")]
        [RegularExpression(@"[MF]", ErrorMessage = "性别格式不正确！")]
        public string sex { get; set; }
    }
    #endregion

    #region 收货地址
    /// <summary>
    /// 用户地址
    /// </summary>
    public class AddressInfoInput : BaseInput
    {
        /// <summary>
        /// 地址ID
        /// </summary>
        public int address_id { get; set; }
        /// <summary>
        /// 收货人
        /// </summary>
        [Required(ErrorMessage = "收货人不能为空！")]
        public string accepter_name { get; set; }
        /// <summary>
        /// 省
        /// </summary>
        public string province_code { get; set; }
        /// <summary>
        /// 市
        /// </summary>
        public string city_code { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public string country_code { get; set; }
        /// <summary>
        /// 省市区逗号分隔
        /// </summary>
        [Required(ErrorMessage = "省市区不能为空！")]
        public string area { get; set; }
        /// <summary>
        /// 详细地址
        /// </summary>
        [Required(ErrorMessage = "详细地址不能为空！")]
        public string address { get; set; }
        /// <summary>
        /// 电话号码
        /// </summary>
        [Required(ErrorMessage = "手机号不能为空！")]
        public string mobile { get; set; }
        /// <summary>
        /// 邮政编码
        /// </summary>
        //[Required(ErrorMessage = "邮编不能为空！")]
        public string post_code { get; set; }
        /// <summary>
        /// 是否默认
        /// </summary>
        public bool is_default { get; set; }
    }

    /// <summary>
    /// 用户地址
    /// </summary>
    public class AddressInput : BaseInput
    {
        /// <summary>
        /// 地址ID
        /// </summary>
        public int address_id { get; set; }
    }
    #endregion

    #region 手机更换
    /// <summary>
    /// 更换手机号输入信息
    /// </summary>
    public class UpdateMobileInput : BaseInput
    {
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "验证码不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "验证码格式不正确！")]
        public string code { get; set; }
    }

    /// <summary>
    /// 更换手机号输入信息
    /// </summary>
    public class UpdateNewMobileInput : BaseInput
    {
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "验证码不能为空！")]
        public string code { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Required(ErrorMessage = "验证码不能为空！")]
        public string first_code { get; set; }
    }
    #endregion

    #region 支付密码
    /// <summary>
    /// 添加登录密码
    /// </summary>
    public class AddLoginPasswordInput : BaseInput
    {
        /// <summary>
        /// 登录密码
        /// </summary>
        [Required(ErrorMessage = "登录密码不能为空！")]
        [RegularExpression(@"^[0-9a-zA-Z`~!@#$%\^&*()_+-={}|\[\]:"";'<>?,.]{6,12}$", ErrorMessage = "密码格式不正确！")]
        public string password { get; set; }
        /// <summary>
        /// 短信验证码
        /// </summary>
        [Required(ErrorMessage = "短信验证不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "验证码格式不正确！")]
        public string code { get; set; }
    }

    /// <summary>
    /// 添加支付密码
    /// </summary>
    public class AddPayPasswordInput : BaseInput
    {
        /// <summary>
        /// 支付密码
        /// </summary>
        [Required(ErrorMessage = "支付密码不能为空！")]
        [RegularExpression(@"^[0-9]{6}$", ErrorMessage = "密码格式不正确！")]
        public string password { get; set; }
        /// <summary>
        /// 短信验证码
        /// </summary>
        [Required(ErrorMessage = "短信验证不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "验证码格式不正确！")]
        public string code { get; set; }
    }

    /// <summary>
    /// 修改登录密码
    /// </summary>
    public class UpdateLoginPasswordInput : BaseInput
    {
        /// <summary>
        /// 支付密码
        /// </summary>
        [Required(ErrorMessage = "登录密码不能为空！")]
        public string password { get; set; }
        /// <summary>
        /// 新支付密码
        /// </summary>
        [Required(ErrorMessage = "新登录密码不能为空！")]
        [RegularExpression(@"^[0-9a-zA-Z`~!@#$%\^&*()_+-={}|\[\]:"";'<>?,.]{6,12}$", ErrorMessage = "密码格式不正确！")]
        public string new_password { get; set; }
    }

    /// <summary>
    /// 修改支付密码
    /// </summary>
    public class UpdatePayPasswordInput : BaseInput
    {
        /// <summary>
        /// 支付密码
        /// </summary>
        [Required(ErrorMessage = "支付密码不能为空！")]
        public string password { get; set; }
        /// <summary>
        /// 新支付密码
        /// </summary>
        [Required(ErrorMessage = "新支付密码不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "密码格式不正确！")]
        public string new_password { get; set; }
    }

    /// <summary>
    /// 通过短信修改密码
    /// </summary>
    public class UpdatePasswordBySMSInput : BaseInput
    {
        /// <summary>
        /// 短信验证码
        /// </summary>
        [Required(ErrorMessage = "短信验证不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "验证码格式不正确！")]
        public string code { get; set; }
        /// <summary>
        /// 新支付密码
        /// </summary>
        [Required(ErrorMessage = "新支付密码不能为空！")]
        [RegularExpression(@"\d{6}", ErrorMessage = "验证码格式不正确！")]
        public string new_password { get; set; }
    }



    #endregion

    #region 用户认证
    /// <summary>
    /// 用户认证输入类
    /// </summary>
    public class UserCertificationInput : BaseInput
    {
        /// <summary>
        /// 用户认证ID
        /// </summary>
        public int certification_id { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        [Required(ErrorMessage = "真实姓名不能为空！")]
        public string name { get; set; }
        /// <summary>
        /// 性别-M：男；F：女
        /// </summary>
        [Required(ErrorMessage = "性别不能为空！")]
        [RegularExpression(@"[MF]", ErrorMessage = "性别格式不正确")]
        public string gender { get; set; }
        /// <summary>
        /// 民族
        /// </summary>
        [Required(ErrorMessage = "民族不能为空！")]
        public string nation { get; set; }
        /// <summary>
        /// 出生日期
        /// </summary>
        [Required(ErrorMessage = "出生日期不能为空！")]
        public DateTime birthdate { get; set; }
        /// <summary>
        /// 住址
        /// </summary>
        [Required(ErrorMessage = "住址不能为空！")]
        public string address { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>
        [Required(ErrorMessage = "身份证号不能为空！")]
        [RegularExpression(@"(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)", ErrorMessage = "身份证格式不正确")]
        public string id_no { get; set; }
        /// <summary>
        /// 签发机关
        /// </summary>
        [Required(ErrorMessage = "签发机关不能为空！")]
        public string issuing_authority { get; set; }
        /// <summary>
        /// 有效开始日期 如:2020-12-25或长期
        /// </summary>
        [Required(ErrorMessage = "有效开始日期不能为空！")]
        public DateTime start_date { get; set; }
        /// <summary>
        /// 有效截止日期 如:2020-12-25或长期
        /// </summary>
        [Required(ErrorMessage = "有效截止日期不能为空！")]
        public string end_date { get; set; }
        /// <summary>
        /// 身份证正面
        /// </summary>
        [Required(ErrorMessage = "身份证正面不能为空！")]
        public string picture_front_url { get; set; }
        /// <summary>
        /// 身份证反面
        /// </summary>
        [Required(ErrorMessage = "身份证反面不能为空！")]
        public string picture_opposite_url { get; set; }
        /// <summary>
        /// 手持身份证
        /// </summary>
        public string picture_hand_url { get; set; }
    }

    /// <summary>
    /// 用户认证输入类
    /// </summary>
    public class GetUserCertificationOutput : BaseInput
    {
        internal DateTime _birthdate;

        /// <summary>
        /// 用户认证ID
        /// </summary>
        public int certification_id { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 性别-M：男；F：女
        /// </summary>
        public string gender { get; set; }
        /// <summary>
        /// 出生日期
        /// </summary>
        public string birthdate { get; set; }
        /// <summary>
        /// 住址
        /// </summary>
        public string address { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>
        public string id_no { get; set; }
        /// <summary>
        /// 有效截止日期 如:2020-12-25或长期
        /// </summary>
        public string end_date { get; set; }
    }
    #endregion

    #region 优惠券
    /// <summary>
    /// 添加优惠券输入信息
    /// </summary>
    public class AddUserCouponInput
    {
        /// <summary>
        /// 优惠券ID
        /// </summary>
        public int coupon_id { get; set; }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int user_id { get; set; }
    }

    /// <summary>
    /// 优惠券输出信息
    /// </summary>
    public class GetUserCouponsOutput : GetCouponOutput
    {
        internal gw_user_coupon user_coupon;
        /// <summary>
        /// 用户优惠券ID
        /// </summary>
        public int user_coupon_id { get; set; }
        /// <summary>
        /// 是否使用
        /// </summary>
        public CouponsStatus coupons_status { get; set; }
    }

    /// <summary>
    /// 优惠券状态
    /// </summary>
    public enum CouponsStatus
    {
        /// <summary>
        /// 未使用
        /// </summary>
        Unused = 1,
        /// <summary>
        /// 已使用
        /// </summary>
        Used = 2,
        /// <summary>
        /// 已过期
        /// </summary>
        Expired = 3,
        /// <summary>
        /// 未领取
        /// </summary>
        Unclaimed = 4
    }

    #endregion

    #region 收藏
    /// <summary>
    /// 添加商品收藏
    /// </summary>
    public class AddGoodsCollection : BaseInput
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        public int goods_id { get; set; }
    }
    /// <summary>
    /// 取消商品收藏
    /// </summary>
    public class DeleteGoodsCollection : BaseInput
    {
        /// <summary>
        /// 商品收藏ID
        /// </summary>
        public int goods_collection_id { get; set; }
    }

    public class GoodsCollectionOutput
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        public int goods_id { get; set; }
        /// <summary>
        /// 商品收藏ID
        /// </summary>
        public int goods_collection_id { get; set; }
    }


    /// <summary>
    /// 添加店铺收藏
    /// </summary>
    public class AddShopCollectionInput : BaseInput
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        public int shop_id { get; set; }
    }

    /// <summary>
    /// 商品收藏
    /// </summary>
    public class GetGoodsCollectionOutput
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        public int goods_id { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string goods_name { get; set; }
        /// <summary>
        /// 图片URL
        /// </summary>
        public string picture_url { get; set; }
        /// <summary>
        /// 商品价格
        /// </summary>
        public string goods_price { get; set; }
        /// <summary>
        /// 商品描述
        /// </summary>
        public string summary { get; set; }
        public GoodsType goods_type { get; internal set; }
    }

    /// <summary>
    /// 店铺收藏
    /// </summary>
    public class GetShopCollectionOutput
    {
        internal DateTime add_time;

        /// <summary>
        /// 店铺ID
        /// </summary>
        public int shop_id { get; set; }
        /// <summary>
        /// 店铺名称
        /// </summary>
        public string shop_name { get; set; }
        /// <summary>
        /// 图片URL
        /// </summary>
        public string picture_url { get; set; }
        /// <summary>
        /// 订单数量
        /// </summary>
        public int order_count { get; set; }
    }

    #endregion

    #region 绑定
    public class AddBindingInput : BaseInput
    {
        public ThirdLoginInput third_login { get; set; }
    }
    public class DeleteBindingInput : BaseInput
    {
        public BindingType type { get; set; }
    }
    #endregion

    #region VIP规则
    public class GetVipRulesOutput
    {
        /// <summary>
        /// 会员商品
        /// </summary>
        public IPagedList<GetGoodsListOutput> member_goods { get; set; }
        /// <summary>
        /// 会员特权
        /// </summary>
        public List<GetVipRuleOutput> rules { get; set; }
        /// <summary>
        /// 会员价
        /// </summary>
        public string member_price { get; set; }
        /// <summary>
        /// 会员促销价
        /// </summary>
        public string member_promote_price { get; set; }
        /// <summary>
        /// 是否展示
        /// </summary>
        public bool is_show { get; set; }
    }

    public class GetVipRuleOutput
    {
        /// <summary>
        /// 用户规则ID
        /// </summary>
        public int user_rule_id { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// 子标题
        /// </summary>
        public string title_sub { get; set; }
        /// <summary>
        /// 副标题
        /// </summary>
        public string subhead { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public string picture_url { get; set; }
        /// <summary>
        /// 简述
        /// </summary>
        public string summary { get; set; }
        /// <summary>
        /// 默认图标
        /// </summary>
        public string ico { get; set; }
        /// <summary>
        /// 选中图标
        /// </summary>
        public string selected_ico { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public List<string> pictures { get; internal set; }
    }
    #endregion

    public class GetWeixinConfigureInfoOutput
    {
        /// <summary>
        /// 公众号的唯一标识
        /// </summary>
        public string appId { get; set; }
        /// <summary>
        /// 时间戳
        /// </summary>
        public string timestamp { get; set; }
        /// <summary>
        /// 随机串
        /// </summary>
        public string nonceStr { get; set; }
        /// <summary>
        /// 签名
        /// </summary>
        public string signature { get; set; }


    }

    public class GetTicketOutput
    {
        /// <summary>
        /// 
        /// </summary>
        public int errcode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string errmsg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ticket { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int expires_in { get; set; }
    }

    public class GetToken
    {
        public string access_token { get; set; }
        public string expires_in { get; set; }
        public string errcode { get; set; }
        public string errmsg { get; set; }
    }
}